package com.hnhegui.backend.order.enu;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 配送类型枚举
 */
@Getter
@AllArgsConstructor
public enum DeliveryTypeEnum {
    EXPRESS("快递配送"),
    PICKUP("门店自提"),
    VIRTUAL("虚拟商品");

    private final String description;

    public static DeliveryTypeEnum getByName(String name) {
        for (DeliveryTypeEnum value : values()) {
            if (value.name().equals(name)) {
                return value;
            }
        }
        return null;
    }
}
